|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jface.text.source.AnnotationPainter
Paints annotations provided by an annotation model as squiggly lines and/or highlighted onto an associated source viewer. Clients usually instantiate and configure objects of this class.
Field Summary |
Fields inherited from interface org.eclipse.jface.text.IPainter |
CONFIGURATION, INTERNAL, KEY_STROKE, MOUSE_BUTTON, SELECTION, TEXT_CHANGE |
Constructor Summary | |
AnnotationPainter(ISourceViewer sourceViewer,
IAnnotationAccess access)
Creates a new annotation painter for the given source viewer and with the given annotation access. |
Method Summary | |
void |
addAnnotationType(Object annotationType)
Adds the given annotation type to the list of annotation types whose annotations should be painted by this painter. |
void |
addHighlightAnnotationType(Object annotationType)
Adds the given annotation type to the list of annotation types whose annotations should be highlighted this painter. |
void |
applyTextPresentation(TextPresentation tp)
This method is called when a region is about to be drawn in order to get the text presentation information. |
void |
deactivate(boolean redraw)
Deactivates this painter. |
void |
dispose()
Disposes this painter. |
boolean |
isPaintingAnnotations()
Returns whether the list of annotation types whose annotations are painted by this painter contains at least on element. |
void |
modelChanged(IAnnotationModel model)
Called if a model change occurred on the given model. |
void |
paint(int reason)
Requests this painter to repaint because of the given reason. |
void |
paintControl(PaintEvent event)
Sent when a paint event occurs for the control. |
void |
removeAllAnnotationTypes()
Clears the list of annotation types whose annotations are painted by this painter. |
void |
removeAnnotationType(Object annotationType)
Removes the given annotation type from the list of annotation types whose annotations are painted by this painter. |
void |
removeHighlightAnnotationType(Object annotationType)
Removes the given annotation type from the list of annotation types whose annotations are highlighted by this painter. |
void |
setAnnotationTypeColor(Object annotationType,
Color color)
Sets the color in which the squiggly for the given annotation type should be drawn. |
void |
setPositionManager(IPaintPositionManager manager)
Sets the paint position manager that can be used by this painter or removes any previously set paint position manager. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AnnotationPainter(ISourceViewer sourceViewer, IAnnotationAccess access)
sourceViewer
- the source viewer for this painteraccess
- the annotation access for this painterMethod Detail |
public void applyTextPresentation(TextPresentation tp)
ITextPresentationListener
applyTextPresentation
in interface ITextPresentationListener
tp
- the current text presentationpublic void modelChanged(IAnnotationModel model)
IAnnotationModelListener
modelChanged
in interface IAnnotationModelListener
model
- the changed annotation modelpublic void setAnnotationTypeColor(Object annotationType, Color color)
annotationType
- the annotation typecolor
- the colorpublic void addAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void addHighlightAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void removeAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void removeHighlightAnnotationType(Object annotationType)
annotationType
- the annotation typepublic void removeAllAnnotationTypes()
public boolean isPaintingAnnotations()
true
if there is an annotation type whose annotations are paintedpublic void dispose()
IPainter
dispose
in interface IPainter
IPainter.deactivate(boolean)
public void paintControl(PaintEvent event)
PaintListener
paintControl
in interface PaintListener
event
- an event containing information about the paintpublic void deactivate(boolean redraw)
IPainter
redraw
indicates whether the painter should remove
any decoration it previously applied. A deactivated painter can be reactivated by calling
paint
.
deactivate
in interface IPainter
redraw
- true
if any previously applied decoration should be removedIPainter.paint(int)
public void paint(int reason)
IPainter
paint
in interface IPainter
reason
- the repaint reason, value is one of the constants defined in this interfacepublic void setPositionManager(IPaintPositionManager manager)
IPainter
setPositionManager
in interface IPainter
manager
- the paint position manager or null
|
Eclipse Platform Pre-release 3.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |